package org.bluedream.core.module.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.bluedream.comm.base.OrgTreeEntity;
import org.bluedream.comm.base.TreeEntity;

@ToString(callSuper = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_menu")
public class Menu extends TreeEntity<Menu> {
    private static final long serialVersionUID = 1L;

    @TableField(value = "menu_name")
    @Setter
    @Getter
    @NonNull
    private String treeName;
    @TableField(value = "menu_code")
    @Setter
    @Getter
    @NonNull
    private String treeCode;

    @Setter
    @Getter
    @NonNull
    private String menuType;    //菜单类型
    @Setter
    @Getter
    private String menuHref;   //链接
    @Setter
    @Getter
    private String menuTarget; //目标
    @Setter
    @Getter
    private String menuIcon;    //图标
    @Setter
    @Getter
    private String menuColor;   //颜色
    @Setter
    @Getter
    private String permission;  //权限标识
    @Setter
    @Getter
    private Integer weight;     //菜单权重
    @Setter
    @Getter
    @NonNull
    private String isShow;      //是否显示
    @Setter
    @Getter
    private String sysCode;     //归属系统（default:主导航菜单、mobileApp:APP菜单）

    @TableField(exist = false)
    @Setter
    @Getter
    private Organization organization;

    public Menu(String id) {
        this.id = id;
    }
}
